package com.example.administrator.about_huanxin;

import com.hyphenate.chat.EMClient;

/**
 * Created by Administrator on 2017/3/10.
 */
public final class EMUtils {
    private EMUtils() {
    }
    //判断用户是否已经登录到环信服务器
    public static boolean isLogin(){
        // EMClient.getInstance().isConnected() 是否连接到了环信服务器
        //EMClient.getInstance().isLoggedInBefore() 之前是否登录到了环信服务器，并到现在没有退出
        return EMClient.getInstance().isConnected()&&EMClient.getInstance().isLoggedInBefore();
    }
}
